<template>
  <div>
    <comtent :textData="item" v-for="(item, index) in textlist" :key="index" />
  </div>
</template>

<script>
import comtent from "./comtent";
export default {
  components: {
    comtent,
  },
  data () {
    return {
      textlist: [
        {
          content: "前排沙发",
        },

        {
          content: "这是什么东西,这么好吃",
        },

        {
          content: "山上有座庙",
          parent: {
            content: "从前有座山",
          },
        },

        {
          content: "庙里有个和尚",
          parent: {
            content: "山上有座庙",
            parent: {
              content: "从前有座山",
            },
          },
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
div {
  padding: 10px;
  margin: 10px;
  border: 2px solid rgb(114, 198, 236);
}
</style>